package org.file5.dao;

import java.util.List;

import org.file5.domain.BaseEntity;
import org.file5.domain.Category;
import org.file5.domain.Entity2Entity;
import org.file5.util.DataBean;

import com.googlecode.objectify.Key;

public interface CategoryDao {
	
	public <E extends BaseEntity> E addEntity2PrimaryCategoryTrail(Class<E> entityClass,E entity,Entity2Entity.Relation relation,Category category);
	public List<Category> getPrimaryCategoryTrail(Key<Category> categoryKey);

	/**
	 * get Categories
	 * 
	 * @param startPosition
	 * @param maxResult
	 * @param params, supported params:
	 * 				1. CategoryUid i.e. primaryCategoryUid
	 * 				2. Category.Type 
	 * @return
	 */
	public DataBean<Category> getCategories(int startPosition,int maxResult,final Object... params);
	public DataBean<Category> getChildCategories(int startPosition, int maxResult,String categoryUid);
}
